'use strict';

var __importDefault =
    (this && this.__importDefault) ||
    function (mod) {
        return mod && mod.__esModule
            ? mod
            : {
                  default: mod
              };
    };

exports.__esModule = true;
/*
  两种网络请求：postRequest => POST, getRequest => GET
  请求头header: 默认json，支持自定义({})或快速写入('form', 'json')
*/

var request_1 = require('../../utils/request');

var globalData_1 = require('../../globalData');

var request = new request_1['default']({
    ApiUrl: globalData_1['default'].URL
}); 


exports.getSellerPayConfigBySellerId = function (sellerId) {
    return request.postRequest({
        url: `api-service/api/getSellerPayConfigBySellerId/${sellerId}`
    });
};

// 能银支付-调起支付接口   
exports.nengYinPayUnifiedOrder = function (params) {
    return request.postRequest({
        url: '/api-service/api/nengYinPay/unifiedOrder',
        data: params
    });
}

// 能银支付-取消支付
exports.nengYinPayCancelRecharge = function (params) {
    return request.postRequest({
        url: 'api-service/api/nengYinPay/cancelRecharge',
        data: params
    });
}; 

// 能银支付-支付成功主动查询接口
exports.nengYinPayOrderQuery = function (params) {
    return request.postRequest({
        url: 'api-service/api/nengYinPay/orderQuery',
        data: params,
		header: 'form',
    });
};

